package com.dhcc.thymeleaf.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.dhcc.thymeleaf.utils.UCloudUtil;
import com.dhcc.thymeleaf.vo.Result;

/**
* <p>标题: ImageController.java</p>
* <p>业务描述:健康管理平台</p>
* <p>公司:东华软件股份公司</p>
* <p>版权:dhcc2013</p>
* @author 胡凯
* @date 2019年11月28日
* @version V1.0 
*/
@RestController
@RequestMapping("image")
public class ImageController {
    @Autowired
    private UCloudUtil uCloudUtil;
	
    @RequestMapping(value = "/check/{month}/{day}/{imgUrl}",method = RequestMethod.GET)
	public Result checkImage(
			@PathVariable String month,
			@PathVariable String day,
			@PathVariable String imgUrl
			) {
    	imgUrl = month+"/"+day+"/"+imgUrl;
		String checkResult = uCloudUtil.check(imgUrl);
		return Result.ok(checkResult);
	}
}
